package t20211225;

import java.util.HashSet;
import java.util.Random;

/**
 * @Author: DengJia
 * @Date: 2021/12/25 16:11
 * @Description:
 */

public class LearnSet {
    public static void main(String[] args) {
        Random r = new Random();
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < 100; i++) {
            set.add(r.nextInt(100));
        }
        System.out.println("set.size() = " + set.size());
        System.out.println("set = " + set);
    }
}
